package top.metaspace.singleton;

/**
 * @author panjun
 * @date 2018/6/21.
 * 静态内部类获得单例
 *
 */
public class StaticInnerClassSingleton {

	private StaticInnerClassSingleton(){

	}

	private static class Inner{
		private static StaticInnerClassSingleton singleton = new StaticInnerClassSingleton();
	}

	public static StaticInnerClassSingleton getInstance(){
		return Inner.singleton;
	}

}
